package com.study.service.serviceImpl;

import com.study.entity.DataDictionary;
import com.study.service.DataDictionaryService;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

import static org.junit.Assert.*;

/**
 * Created by Administrator on 2017/10/20.
 */
public class DataDictionaryServiceImplTest {

    ClassPathXmlApplicationContext context;
    @Before
    public void setUp() throws Exception {
        context=new ClassPathXmlApplicationContext("spring/spring-config.xml");
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test
    public void findList() throws Exception {
       DataDictionaryService dataDictionaryService= (DataDictionaryService) context.getBean("dataDictionaryServiceImpl");
        DataDictionary dataDictionary=new DataDictionary();
        dataDictionary.setTypeCode("categoryLevel1");
        List<DataDictionary> list = dataDictionaryService.findList(dataDictionary);
        System.out.println(list);

    }

}